package com.luoye.lj.util.mvc.data;

/**
 * Created with IntelliJ IDEA.
 * User: Dave Liu
 * Date: 15-11-8
 * Time: 下午9:25
 * ajax请求返回数据
 */
public class SimpleResponseBody<T> {
    boolean ok;
    String msg;
    T entity;

    public SimpleResponseBody() {
    }

    public SimpleResponseBody(boolean ok, String msg) {
        this.ok = ok;
        this.msg = msg;
    }

    public SimpleResponseBody(boolean ok, String msg, T entity) {
        this.ok = ok;
        this.msg = msg;
        this.entity = entity;
    }

    public boolean isOk() {
        return ok;
    }

    public void setOk(boolean ok) {
        this.ok = ok;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getEntity() {
        return entity;
    }

    public void setEntity(T entity) {
        this.entity = entity;
    }

    @Override
    public String toString() {
        return "SimpleResponseBody{" +
                "ok=" + ok +
                ", msg='" + msg + '\'' +
                ", entity=" + entity +
                '}';
    }
}
